#pragma once
#include <vector>
#include "Geometry.h"

class TiXmlElement;
class Obstacle
{
public:
	Obstacle(void);
	virtual ~Obstacle(void);

	bool parseXml(TiXmlElement* node);
	void render();
	bool isBoundingBox() const { return isBoundingBox_; }
	void getBoundingBox(int& left, int& right, int& top, int& bottom) const;

	bool clear(const Vector2& v, float radius) const;
	bool link(const Vector2& from, const Vector2& to, float radius) const;

protected:
	std::vector<Vector2> vertices_;

	bool isBoundingBox_;
	bool isClosed_;
};

